﻿@model IEnumerable<Irandeb4.Models.Order>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Company
        </th>
        <th>
            GeneralDescription
        </th>
        <th>
            OrderDate
        </th>
        <th>
            OrderExpiration
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Company.Nit)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.GeneralDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OrderDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OrderExpiration)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.OrderId }) |
            @Html.ActionLink("Details", "Details", new { id=item.OrderId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.OrderId })
        </td>
    </tr>
}

</table>
